package com.laowang.framework.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

/**
 * @Auther laowang
 * @Date 2024/3/15
 * @Description 事件发布者
 */
@Component
public class EventPublisher {
    @Autowired
    ApplicationEventPublisher applicationEventPublisher;


    public void publishEvent(ApplicationEvent event) {
        applicationEventPublisher.publishEvent(event);
    }

}
